<div class="list">
	<table cellspacing="0" cellpadding="0">
		<tr class="th">
			<th>ID</th>	
			<th>标题</th>
			<th>位置</th>
			<th>链接</th>	
			<th>图片</th>	
			<th>操作</th>	
		</tr>
		<?php foreach($ads as $item):?>
		<tr class="bg">
			<td width="60"><?php echo $item['id'];?></td>
			<td align="left"><?php echo $item['title'];?></td>
			<td><?php echo service_type::getName($item['type']);?></td>
			<td align="left"><?php echo $item['url'];?></td>
			<td align="left"><img src="<?php echo service_image::getThumb($item['src']);?>" alt="<?php echo $item['title'];?>"/></td>
			<td class="odd">
				<a class="ajax2" id="<?php echo $item['id'];?>" href="javascript:void(0);" >编辑</a>
			</td>
		</tr>

		<?php endforeach;?>

	</table>
</div>
<script type="text/javascript">
$(document).ready(function(){
	$(".ajax2").mouseover(function(){
        id = $(this).attr('id');
        $(".ajax2").wBox({requestType: "ajax",title:"广告修改",target:"<?php echo url('ad/edit?id=')?>"+id});
    });
	$(".bg:odd").css("background-color","#EDEDED");
});
</script>
